package com.zzy.mccjt.gateway.common.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * description----------
 *
 * @author likejie
 * @version 1.0
 * @date 2018/11/3 11:50
 */
@Data
@RefreshScope
@Configuration
@ConfigurationProperties(prefix = "authorization")

public class AuthorizationProperties {

    private String refreshTokenPath="/v1/sys/token/refresh";
    /**
     * 白名单
     */
    private List<String> whitelist;

    public List<String> getWhitelist() {
        if(whitelist==null){
            return new ArrayList<>();
        }
        return whitelist;
    }
}
